package com.springlearn.springsecurity.controller;

import com.springlearn.springsecurity.pojo.User;
import com.springlearn.springsecurity.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author llj
 * @create 2022-04-19 21:01
 */

@RestController
public class HelloController {


    @Autowired
    private UserService userService;

    @GetMapping("/getUser")
    public User getUser(@RequestParam String name){
        return userService.getUser(name);
    }


}
